1. Field of the Invention
The present invention relates to an image reading apparatus and an image reading method for reading image information on an original, and a program for implementing the method.
2. Description of the Related Art
Generally, an image reading apparatus illuminates an original with a light source and reads an image of the original with a line image sensor or the like. Since there is unevenness in the amount of light from the light source and in the sensitivity of the line image sensor, correction must be performed by reading a white-colored reference member. In this case, typically, the amount of light is adjusted for achieving an appropriate amount of light from the light source illuminating the original. And also the gain is adjusted for optimizing the gain of a circuit amplifying signals output from the line image sensor. Then, shading correction is performed, by which the unevenness in the amount of light from the light source and the unevenness in the sensitivity of the line image sensor is corrected for each light-receiving element of the line image sensor. In the subsequent description of embodiments of the present invention, “shading correction” refers to correction in order for the line image sensor to evenly read image information on an original, and includes the above-described “adjustment of the amount of light”, “adjustment of the gain”, and the like.
In reading an original, a color other than white (e.g., black) is typically adopted as the color of an opposing member arranged at a position opposite to the line image sensor to facilitate detecting the boundary between the original and a background image, detecting a skew of the original, and show-through reduction for the original.
FIG. 19A is a diagram showing a first moving position of a line image sensor in a conventional image reading apparatus, and FIG. 19B a diagram showing a second moving position of the line image sensor in the conventional image reading apparatus.
As shown in FIGS. 19A and 19B, while conveying an original 723, the image reading apparatus 701 obtains image data by performing A/D conversion and the like on signals that are output from the line image sensor 711 reading an image of the original 723. The timing of reading the image is such that the image reading is started after the leading edge of the original passes a position where a registration sensor 721 is arranged, and the image reading is finished after the original passes the position where the registration sensor 721 is arranged. Since the registration sensor 721 is arranged upstream in the direction of conveying the original at a certain distance from the line image sensor 711, reading of the original is started when a predetermined time has elapsed from the passing of the leading edge of the original over the registration sensor 721. Similarly, reading of the original is finished when a predetermined time has elapsed from the passing of the trailing edge of the original over the registration sensor 721. Thus, the leading edge registration and the trailing edge registration for the read image are adjusted.
Before reading the original 723, the image reading apparatus 701 first moves the line image sensor 711 in the direction of an arrow S shown and reads a reference member 717. This allows correction data to be obtained and stored for each light-receiving element for performing shading correction on the image data obtained based on output from the line image sensor 711.
It is to be noted that the image reading apparatus 701 can detect the movement of the line image sensor 711 to the position for reading the reference member 717 with a position detection sensor 720.
Then, the image reading apparatus 701 returns the line image sensor 711 to its initial position (FIG. 19B), and reads the original 723 while conveying the original 723. In reading of the original 723, the image reading apparatus 701 performs the shading correction for the image data obtained based on the output from the line image sensor 711, by referring to the previously stored correction data.
Thus, in the image reading apparatus having a mechanism such that the line image sensor 711 moves between the position for obtaining the correction data for the shading correction (FIG. 19A) and the position for reading the original (FIG. 19B), misalignment of the position where the image information on the original is read causes misalignment of registration in the reading of the original. To prevent this misalignment of registration, the position detection sensor 720 for detecting the position of the line image sensor is typically provided for positioning the line image sensor.
Conventionally, detection of the size of an image of an original in a read image and detection of a skew of the image of the original are performed by providing a black-colored opposing member opposite to the line image sensor and detecting the position of the boundary between a black background portion and the portion of the image of the original in the read image.
However, for originals with a low-brightness marginal part, such as those with a black outer edge portion or those with a low light reflectivity, it is difficult to detect the position of the boundary between the background image (black) and the portion of the original. To solve this problem, an image reading apparatus with an opposing member of a high-reflectivity color (typically white) is disclosed (for example, see Japanese Laid-Open Patent Publication (Kokai) No. 2005-57813). Further, in this image reading apparatus, a read image is binarized by a threshold so that a shadow of an original in the read image is left visible in the binarized read image (see FIG. 20A). This shadow portion of the read image is used to detect the position of the boundary between the original and the background image. When the opposing member is in white and the read original has a low reflectivity, the position of the boundary between the original and the background image can be determined from the difference in their brightness and therefore can be detected (see FIG. 20B).
However, if there is dust on the line image sensor or on its opposing member while the image information on the original is being read, it causes a vertical streak in the read image, for example at a position as shown in FIG. 21. When the read image in FIG. 21 is binarized by a threshold, the vertical streak appears as a black line. For example, the image reading apparatus disclosed in the Japanese Laid-Open Patent Publication (Kokai) No. 2005-57813 scans the image of the original from its sides in the direction L or R and identifies a position where the color changes from white to black as an edge of the original. When the binarized image is scanned in the direction R, the boundary between the right edge of the original and the background image can be detected. However, when it is scanned in the direction L, the vertical streak (black line) is detected. Therefore, there is a problem that the position of the boundary between the left edge of the original and the background image cannot be accurately detected.